package cs275.ants.graph.antgraph;

import java.util.List;

import com.google.common.collect.Lists;

import cs275.ants.agent.Ant;
import cs275.ants.graph.base.GraphVertex;

public class AntGraphVertex extends GraphVertex {
	
	private static final long serialVersionUID = -383546650406524786L;
	List<Ant> ants;
	private boolean isFood = false;
	
	public AntGraphVertex(int row, int col) {
		super(row, col);
		this.ants = Lists.<Ant>newArrayList();
	}

	public AntGraphVertex(List<Ant> ants, int row, int col) {
		super(row, col);
		this.ants = ants;
	}

	public List<Ant> getAnts() {
		return ants;
	}

	public void addAnt(Ant ant) {
		ants.add(ant);
	}
	
	public boolean hasFood() { 
		return this.isFood;
	}
	
	public void setFood(boolean is) { 
		this.isFood = is; 
	}
	
	@Override
	public String toString() {
		return String.format("(%d,%d)", getCoordinates().getX(), getCoordinates().getY());
	}
}
